# -*- coding: utf-8 -*-
from common.helper import Helper
from db.mysql import MysqlClient
class Arrangement( object ):
    def __init__(self):
        self.mysql = MysqlClient()
        self.name = "天地关爱百万医疗（2019个人版）"
    # 拉取数据
    def pullData(self, data={}):
        for item in Helper.selectData(self.name, self.mysql):
            data["name"] = self.name
            data["company"] = "中国大地保险"
            data["year"] = item["year"]
            data["socialSec"] = item["socialSec"]
            data["expire"] = item["expire"]
            data["payType"] = item["payType"]
            data["generalMedical"] = str(int(int(item["generalMedical"])/10000)) + "w"
            data["cancerMedical"] = str(int(int(item["cancerMedical"])/10000)) + "w"
            data["accidentPlane"] = str(int(int(item["accidentPlane"])/10000)) + "w"
            data["accidentTrain"] = str(int(int(item["accidentTrain"])/10000)) + "w"
            data["accidentShip"] = str(int(int(item["accidentShip"])/10000)) + "w"
            data["accidentPassenger"] = str(int(int(item["accidentPassenger"])/10000)) + "w"
            data["extSerious"] = "0w" if item["extSerious"] == "0" else str(int(int(item["extSerious"])/10000)) + "w"
            data["importWard"] = item["importWard"]
            data["price"] = item["price"]
            Helper.mergeTable( self.name,self.mysql,data )
